import os, sys
from db_wrapper import DBWrapper
from time import time
from datetime import datetime

db = DBWrapper()
db.setParam("localhost", "ganglia", "ganglia", "ganglia")
db.connectMySQL()
for i in range(0, 300):
  processTime = \
    datetime.fromtimestamp(time()+i*100000).strftime("%Y-%m-%d %H:%M:%S")
  print processTime
  db.insert("test", "(time, host, name, value)",\
   "(\'%s\', %s, %s, %s)"%(processTime, "\'computer.host\'","\'test\'",i));
db.disconnect()


